// 初始化模拟数据，为用户提供测试账号

// 模拟用户数据
const mockUsers = [
  {
    id: 'user1',
    username: 'admin',
    password: 'admin123',
    bio: '系统管理员',
    description: '全栈开发者 | 技术爱好者 | 摄影发烧友',
    website: 'https://example.com/admin',
    posts: 42,
    followers: 1253,
    following: 28,
    likes: 15420,
  },
  {
    id: 'user2',
    username: 'user',
    password: 'user123',
    bio: '普通用户',
    description: '热爱生活，喜欢分享日常点滴',
    website: 'https://example.com/user',
    posts: 12,
    followers: 42,
    following: 86,
    likes: 785,
  },
]

// 模拟用户作品数据
const mockUserWorks = [
  {
    id: '1',
    image: '/src/assets/科技数码展宣传图.jpg',
    thumbnail: '/src/assets/科技数码展宣传图.jpg',
    thumbnailBlur: '/src/assets/科技数码展宣传图.jpg',
    title: 'Vue3框架入门教程',
    description: '全面讲解Vue3的核心概念和使用方法',
    createTime: '2024-01-15',
    views: 1234,
    likes: '2.3万',
    comments: '1,283',
    bulletCount: 32,
    tags: ['Vue3', '教程', '前端'],
    qualityBadge: '高清',
  },
  {
    id: '2',
    image: '/src/assets/二次元美食节海报_3.jpg',
    thumbnail: '/src/assets/二次元美食节海报_3.jpg',
    thumbnailBlur: '/src/assets/二次元美食节海报_3.jpg',
    title: '现代前端开发工作流',
    description: '提升开发效率的完整工作流程搭建',
    createTime: '2024-02-10',
    views: 5678,
    likes: '1.8万',
    comments: '956',
    bulletCount: 120,
    tags: ['工作流', '开发', '效率'],
    qualityBadge: '超清',
  },
  {
    id: '3',
    image: '/src/assets/鬼灭之刃.jpeg',
    thumbnail: '/src/assets/鬼灭之刃.jpeg',
    thumbnailBlur: '/src/assets/鬼灭之刃.jpeg',
    title: '响应式设计最佳实践',
    description: '响应式网页设计的实用技巧和案例分析',
    createTime: '2024-03-05',
    views: 8901,
    likes: '3.1万',
    comments: '1,542',
    bulletCount: 256,
    tags: ['响应式', '设计', 'UI'],
    qualityBadge: '高清',
  },
  {
    id: '4',
    image: '/src/assets/黑神话.jpeg',
    thumbnail: '/src/assets/黑神话.jpeg',
    thumbnailBlur: '/src/assets/黑神话.jpeg',
    title: 'CSS动画效果教程',
    description: '从基础到高级的CSS动画技巧教学',
    createTime: '2024-03-20',
    views: 3456,
    likes: '2.5万',
    comments: '1,128',
    bulletCount: 89,
    tags: ['CSS', '动画', '前端'],
    qualityBadge: '超清',
  },
  {
    id: '5',
    image: '/src/assets/动漫.png',
    thumbnail: '/src/assets/动漫.png',
    thumbnailBlur: '/src/assets/动漫.png',
    title: 'JavaScript异步编程',
    description: '深入理解JavaScript异步编程模型',
    createTime: '2024-04-10',
    views: 6789,
    likes: '1.9万',
    comments: '876',
    bulletCount: 156,
    tags: ['JavaScript', '异步', 'Promise'],
    qualityBadge: '高清',
  },
  {
    id: '6',
    image: '/src/assets/喜剧电影.jpeg',
    thumbnail: '/src/assets/喜剧电影.jpeg',
    thumbnailBlur: '/src/assets/喜剧电影.jpeg',
    title: '前端性能优化指南',
    description: '全面提升网页性能的优化策略',
    createTime: '2024-04-25',
    views: 9012,
    likes: '2.7万',
    comments: '1,345',
    bulletCount: 320,
    tags: ['性能优化', '前端', '教程'],
    qualityBadge: '4K',
  },
]

// 初始化模拟数据
function initMockData() {
  // 检查localStorage中是否已有注册用户
  const existingUsers = localStorage.getItem('registeredUsers')
  if (!existingUsers) {
    // 如果没有，添加模拟用户数据
    localStorage.setItem('registeredUsers', JSON.stringify(mockUsers))
    localStorage.setItem('userWorks', JSON.stringify(mockUserWorks))
    console.log('模拟用户数据已初始化')
  }
}

export { initMockData, mockUsers }